@use "sass:map";

@import '../variables';

$lg: map.get($grid-breakpoints, 'lg');
$md: map.get($grid-breakpoints, 'md');

.modal-dialog.scenario-loader-modal {
  @media screen and (min-width: $md) {
    width: 90vw;
    max-width: 1200px;
  }

  .modal-header {
    padding: 0.45em 0.85em;
  }

  @media screen and (max-width: $md) {
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;

    .modal-content {
      position: absolute;
      top: 0;
      padding: 0;
      margin: 0;
      overflow: scroll;
      overflow: overlay;
    }

    .modal-header {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 10000;
      width: 99vw;
      background-color: $body-background;
    }

    .modal-body {
      padding: 0;
      margin-top: 45px;
    }
  }
}

.modal-content {
  background-color: $body-background;
}

.scenario-loader-card {
  &.card {
    margin: 0 auto;
    background-color: $white;
    border-width: 0;
    box-shadow: 1px 1px 3px 3px $gray-400;
  }

  @media screen and (min-width: $lg) {
    height: 85vh;
  }

  @media screen and (min-width: $md) {
    height: 80vh;
  }

  @media screen and (max-width: $md) {
    .card-body {
      padding: 0 auto;
      margin: 0 auto;
    }

    &.scenario-loader-card-list {
      height: 75vh;
      margin-bottom: 4px;
    }

    &.scenario-loader-card-uploader {
      min-height: 50vh;
      margin: 0;
      margin-bottom: 4px;
    }
  }
}

.scenario-loader-list-container {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

.scenario-loader-list-input-group {
  display: flex;
  flex-grow: 0;
  flex-shrink: 0;
}

.scenario-loader-list {
  display: flex;
  flex-grow: 1;
  overflow: scroll;
  overflow: overlay;
  flex-direction: column;
  border: 1px $gray-400 solid;
}

.scenario-loader-list-item {
  cursor: pointer;

  ::selection,
  :active,
  :hover {
    background-color: lighten($primary, 33%);
  }
}

.scenario-loader-uploader-container {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

.scenario-loader-uploader-dropzone-container,
.scenario-loader-uploader-error-list {
  display: flex;
  flex-grow: 1;
}

.scenario-loader-uploader-dropzone-container {
  flex-basis: 75%;
  flex-shrink: 1;
}

.scenario-loader-uploader-error-list {
  overflow: scroll;
  overflow: overlay;
  flex-direction: column;
}

.scenario-loader-uploader-error-list-item {
  margin: 0.25em 0;
  overflow-wrap: anywhere;
}

.scenario-loader-button {
  width: 80px;
  min-height: 45px;

  @media screen and (max-width: $lg) {
    width: 100%;
  }
}

$upload-zone-fg: $gray-500;
$upload-zone-bg: $gray-100;

.upload-zone {
  cursor: pointer;
  background-color: $upload-zone-bg;
  border: 5px $upload-zone-fg dashed;

  &.upload-zone-active {
    border-style: dotted;
  }
}

.upload-icon {
  fill: $upload-zone-fg;
}
